package com.example.community.dto;


import com.example.community.util.Constants;
import com.example.community.validation.PasswordMatches;
import com.example.community.validation.ValidPassword;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * 注册使用此dto
 */
@PasswordMatches
@Data
public class RegisterUserDto {

    @NotNull
    @NotBlank
    @Pattern(regexp = Constants.PATTERN_MOBILE,message = "手机号格式错误")
    private String phone;
    @NotNull
    @ValidPassword
    private String password;

    @NotNull
    private String matchingPassword;

//    private String SMS;

//    @NotNull
//    @NotBlank
//    @Size(min = 1, max = 50, message = "姓名长度必须在4到50个字符之间")
//    private String name;


}
